/*  BEGIN_FILE_HDR
******************************************Copyright(C)*****************************************
*
*                                       YKXH  Technology
*
***********************************File Info***************************************************
*   File Name       @: OsekNm_Cfg.c
************************************************************************************************
*   Project/Product @:
*   Title           @:
*   Author          @: donglin.Zhang
************************************************************************************************
*   Description     @:
*
************************************************************************************************
*   Limitations     @: None
*
************************************************************************************************
*
************************************************************************************************
*   Revision History:
*
*    Version    Date          Initials       CR#             Descriptions
*   ---------   ----------    -------------  ----------    ---------------
*   1.0         2018/05/30    donglin.zhang   N/A          Original
*   1.1         xxxx/xx/xx    xxxxx           N/A          xxxxxxxx
*
************************************************************************************************
* END_FILE_HDR*/

/* Includes */
/**********************************************************************************************/
#include "includes.h"


/*const configuaration array*/
const nmChannelConfigUnion nmChannelConfigAry[NM_NUMBER_OF_CHANNELS]  =
	{
#if(NM_NUMBER_OF_CHANNELS >= 1)
		CN0_CONFIGURATION,
#endif
#if(NM_NUMBER_OF_CHANNELS >= 2)
		CN1_CONFIGURATION,
#endif
#if(NM_NUMBER_OF_CHANNELS >= 3)
		CN2_CONFIGURATION,
#endif
#if(NM_NUMBER_OF_CHANNELS >= 4)
		CN3_CONFIGURATION,
#endif
#if(NM_NUMBER_OF_CHANNELS >= 5)
		CN4_CONFIGURATION,
#endif
	};/*Configuration for each channel*/
const uint8 NmToCanChnAry[NM_NUMBER_OF_CHANNELS]			=	{0};
const uint8 CanToNmChnAry[CANIF_USED_CONTROLLER_NUM]		=	{0};
const uint8 nmTxPduIdAry[NM_NUMBER_OF_CHANNELS]  		 =   {0};/*NM TxPDUID in CanIfTxPduConfig*/
const uint8 nmRxPduIdAry[NM_NUMBER_OF_CHANNELS] 		 =   {3};/*NM RxPDUID in CanIfRxPduConfig*/  //  yhai20200921
const nmNetIdType nmNodeChannelID[NM_NUMBER_OF_CHANNELS] =   {0x22};/*the node ID for different channel.*/
const uint32 nmPduBasicIDAry[NM_NUMBER_OF_CHANNELS]      =   {0x400};/* NM Basic ID in the network */
const uint32 nmPduBasicIDMaskAry[NM_NUMBER_OF_CHANNELS]  =   {0x700};/* NM Message idbase mask*/
const uint32 nmPduSouceIDMaskAry[NM_NUMBER_OF_CHANNELS]  =   {0xff};/*NM Message source id mask*/

const nmTimerCntType nmCountTypAry[NM_NUMBER_OF_CHANNELS]  =   {100};/* Timer: 100ms */
const nmTimerCntType nmCountMaxAry[NM_NUMBER_OF_CHANNELS]  =   {260};/* Timer: 260ms */
const nmTimerCntType nmCountErrAry[NM_NUMBER_OF_CHANNELS]  =   {1000};/* Timer: 1000ms */
const nmTimerCntType nmCountWbsAry[NM_NUMBER_OF_CHANNELS]  =   {5000};/* Timer: 5000ms */
const nmTimerCntType nmCountTxAry [NM_NUMBER_OF_CHANNELS]  =   {30};/* Timer: 30ms */
const nmTimerCntType nmCountFastBusoffAry[NM_NUMBER_OF_CHANNELS] = {50};/*Timer:50ms*/
const nmTimerCntType nmCountSlowBusoffAry[NM_NUMBER_OF_CHANNELS] = {1000};/*Timer:1000ms*/
#if(T_ACTIVE_MINI_ON == STD_ON)						/*OsekNm_013*/
const nmTimerCntType nmCountActMinAry[NM_NUMBER_OF_CHANNELS] = {5000};/*Timer:4000ms*/
#endif
#if(T_LIMPHOME_MINI_ON == STD_ON)
const nmTimerCntType nmCountTLimpHAry[NM_NUMBER_OF_CHANNELS] = {5000};/*Timer:4000ms*/
#endif
const uint8 nmBusOffFastToSlowAry[NM_NUMBER_OF_CHANNELS]   	=   {5}; /*Fast Recover times*/
const uint16 nmBusOffSlowRecoveryAry[NM_NUMBER_OF_CHANNELS] 	=   {20};/*Slow Recover times*/ /*infinite recovery need more than 256*/
const nmRxTxCntType  nmRxLimitAry[NM_NUMBER_OF_CHANNELS]   	=   {4};/* RX_LIMIT  */
const nmRxTxCntType  nmTxLimitAry[NM_NUMBER_OF_CHANNELS]   	=   {8};/* TX_LIMIT  */
